﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;

public partial class ProccessDetail : System.Web.UI.Page
{
    public Entities.Flow flow;
    public string serverstr;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            string flow_id = Request.QueryString["flow_id"];

            int intFlow_id = int.Parse(flow_id);

            DAL.FlowDALs flowdals = new DAL.FlowDALs();
            flow = flowdals.GetByID(intFlow_id);

            DAL.Work_serverDALs work_serverdals = new DAL.Work_serverDALs();

            System.Collections.Generic.IList<Work_server> list1 = work_serverdals.GetByFlowId(flow.Flow_id);
            System.Collections.Generic.IList<Server> lst = new System.Collections.Generic.List<Server>();


            DAL.ServerDALs serverdals = new DAL.ServerDALs();

            foreach (Work_server work_server in list1)
            {
                int server_id = work_server.Server_id;

                Server server = serverdals.GetByID(server_id);
                serverstr += server.Name + " ";
            }
            this.HiddenFlowId.Value = flow_id;
                      
        }
    }

    protected void cmdUpdate_Click(object sender, EventArgs e)
    {
        Response.Redirect("AddProcess.aspx?flow_id=" + this.HiddenFlowId.Value);  
    }
}
